package com.zhaoqi.hr.dto.request;

import com.zhaoqi.hr.entity.UserDocument;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Objects;

/**
 * 文档上传请求DTO
 */
public class DocumentUploadRequest {
    
    /**
     * 文档类型
     */
    @NotNull(message = "文档类型不能为空")
    private UserDocument.DocumentType documentType;
    
    /**
     * 文档名称
     */
    @NotBlank(message = "文档名称不能为空")
    private String documentName;
    
    /**
     * 文档描述
     */
    private String description;
    
    /**
     * 文档编号（如身份证号、营业执照号等）
     */
    private String documentNumber;

    // Getter and Setter methods
    public UserDocument.DocumentType getDocumentType() {
        return documentType;
    }

    public void setDocumentType(UserDocument.DocumentType documentType) {
        this.documentType = documentType;
    }

    public String getDocumentName() {
        return documentName;
    }

    public void setDocumentName(String documentName) {
        this.documentName = documentName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDocumentNumber() {
        return documentNumber;
    }

    public void setDocumentNumber(String documentNumber) {
        this.documentNumber = documentNumber;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DocumentUploadRequest that = (DocumentUploadRequest) o;
        return documentType == that.documentType &&
                Objects.equals(documentName, that.documentName) &&
                Objects.equals(description, that.description) &&
                Objects.equals(documentNumber, that.documentNumber);
    }

    @Override
    public int hashCode() {
        return Objects.hash(documentType, documentName, description, documentNumber);
    }

    @Override
    public String toString() {
        return "DocumentUploadRequest{" +
                "documentType=" + documentType +
                ", documentName='" + documentName + '\'' +
                ", description='" + description + '\'' +
                ", documentNumber='" + documentNumber + '\'' +
                '}';
    }
}
